]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ShellDBus: add ShowApplications method
authorGiovanni Campagna <gcampagna@src.gnome.org>
Wed, 24 Apr 2013 17:32:41 +0000 (19:32 +0200)
committerGiovanni Campagna <gcampagn@redhat.com>
Mon, 2 Sep 2013 09:02:18 +0000 (11:02 +0200)
Add a method to control the visibility of the applications view.
This can used by gnome-settings-daemon for special keys in
certain keyboards.

https://bugzilla.gnome.org/show_bug.cgi?id=698743

js/ui/shellDBus.js
js/ui/viewSelector.js

index 802640b0d842b6cc0d883a9554bc2a1664808d20..c56692f8f244a5ecf6db89bb10e9de5a6a7f85c0 100644 (file)
@@ -28,6 +28,7 @@ const GnomeShellIface = <interface name="org.gnome.Shell">
 <method name="FocusApp">
     <arg type="s" direction="in" name="id"/>
 </method>
+<method name="ShowApplications" />
 <method name="GrabAccelerator">
     <arg type="s" direction="in" name="accelerator"/>
     <arg type="u" direction="in" name="flags"/>
@@ -140,11 +141,12 @@ const GnomeShell = new Lang.Class({
     },
 
     FocusApp: function(id) {
-        let overview = Main.overview;
+        this.ShowApplications();
+        Main.overview.viewSelector.appDisplay.selectApp(id);
+    },
 
-        overview.show();
-        overview.viewSelector.setActivePage(ViewSelector.ViewPage.APPS);
-        overview.viewSelector.appDisplay.selectApp(id);
+    ShowApplications: function() {
+        Main.overview.viewSelector.showApps();
     },
 
     GrabAcceleratorAsync: function(params, invocation) {
index 414dd33bdf00a4fe3f52c271aab1cdf56708b4b7..a78a9f72f97085e7f6a9f5be89714dd931200540 100644 (file)
@@ -165,6 +165,11 @@ const ViewSelector = new Lang.Class({
         this._showAppsButton.checked = !this._showAppsButton.checked;
     },
 
+    showApps: function() {
+        Main.overview.show();
+        this._showAppsButton.checked = true;
+    },
+
     show: function() {
         this._activePage = this._workspacesPage;